import {
	createRouter,
	createWebHistory
} from 'vue-router'
import Auth from '@/views/Auth.vue'
const routes = [{
		path: '/',
		name: 'Auth',
		component: Auth,
		meta: {
			title: '大屏看板验证'
		}
	},
	{
		path: '/NavPage',
		name: 'NavPage',
		component: () => import('@/views/NavPage.vue'),
		meta: {
			title: '大屏看板导航'
		}
	},
	{
		path: '/Dashboard',
		name: 'Dashboard',
		component: () => import('@/views/Dashboard.vue'),
		meta: {
			title: '医疗质量与安全维度(核心使命)'
		}
	},
	{
		path: '/businessCore',
		name: 'businessCore',
		component: () => import('@/views/BusinessCore.vue'),
		meta: {
			title: 'DRG与财务分析维度(经营核心)'
		}
	},
	{
		path: '/performanceEngine',
		name: 'performanceEngine',
		component: () => import('@/views/PerformanceEngine.vue'),
		meta: {
			title: '运营效率监控维度(效能引擎)'
		}
	},
	{
		path: '/Potential',
		name: 'Potential',
		component: () => import('@/views/Potential.vue'),
		meta: {
			title: '人才持续发展和满意度(未来潜力)'
		}
	},
	{
		path: '/PartyBuilding',
		name: 'partyBuilding',
		component: () => import('@/views/PartyBuilding.vue'),
		meta: {
			title: '党建下的引领与凝聚'
		}
	},
	{
		path: '/Demo',
		name: 'demo',
		component: () => import('@/views/Demo.vue'),
		meta: {
			title: 'AI测试'
		}
	},
	{
		path: '/DoctorPerformance',
		name: 'doctorPerformance',
		component: () => import('@/views/DoctorPerformance.vue'),
		meta: {
			title: '科室医生绩效管理'
		}
	}, {
		path: '/NursingPerformance',
		name: 'nursingPerformance',
		component: () => import('@/views/NursingPerformance.vue'),
		meta: {
			title: '住院护理绩效管理'
		}
	},
]

// 创建路由实例
const router = createRouter({
	history: createWebHistory(),
	routes
})

// 全局路由守卫（可选，用于设置页面标题）
router.beforeEach((to) => {
	if (to.meta.title) {
		document.title = to.meta.title;
	}
})

export default router